package ferp.android.dialogs;

import android.content.Context;
import ferp.android.R;
import ferp.android.managers.ProfileManager;
import ferp.core.player.Profile;

import java.util.LinkedList;
import java.util.List;

/**
 * User: igorgok
 * Date: 15/07/2014 11:04
 */
public class MoreDialog extends RadioListViewDialog
{
  public static final int CREATE_PROFILE = 0;
  public static final int DELETE_PROFILE = 1;
  public static final int DELETE_GAME = 2;

  public enum Action {CREATE_PROFILE, DELETE_PROFILE, DELETE_GAME}

  public MoreDialog(Context context, Listener listener, int requestCode)
  {
    super(context, listener, requestCode);
  }

  public void prepare(ProfileManager.Regular rm)
  {
    Context context = getContext();
    Profile p = rm.getCurrentProfile();
    List<String> options = new LinkedList<String>();

    options.add(context.getString(R.string.entrance_create_profile));
    options.add(context.getString(R.string.entrance_delete_profile));

    if (p != null && p.hasGame())
      options.add(context.getString(R.string.entrance_delete_game));

    set(getContext().getString(R.string.entrance_more), options);
  }
}
